-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Kubelet and Containerd when using cgroupfs #8123
Fix Kubelet and Containerd when using cgroupfs #8123
Conversation
Would you mind adding a CI job for this configuration and also adding a point to the docs about why/when this would be needed? I have in mind especially the discussion on #8068 |
We use
and
|
@fungusakafungus Are you also setting |
ah, yes, we set it to |
I tested this on top of the Kata PR #8068 and I managed to successfully create pods with kata 2.2.2. |
@pasqualet since you are replacing the user facing inventory variable |
8fd7e2c
to
e0a48b4
Compare
I've updated default values and the documentation. |
This removes configurability for the default runc runtime, I was just going to use that... |
when: kubelet_cgroup_driver is undefined | ||
|
||
- name: set kubelet_cgroups options when cgroupfs is used | ||
set_fact: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could set defaults depending on kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected)
in defaults.yml like
# Set runtime cgroups
kubelet_runtime_cgroups: >-
{%- if kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected) == "systemd" -%}
/systemd/system.slice
{%- else -%}
/system.slice/containerd.service
{%- endif -%}
kubelet_kubelet_cgroups: "/systemd/system.slice" | ||
|
||
# Set runtime and kubelet cgroups when using cgroupfs as cgroup driver | ||
kubelet_runtime_cgroups_cgroupfs: "/systemd/containerd.service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about the /systemd/
prefix? For us /system.slice/containerd.service
works better(we have containerd metrics via cAdvisor from kubelet), I also just found that value here: https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/util.sh#L827
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it was a mistake. Fixed.
5130ee1
to
4ad344e
Compare
I have created the variable named |
4ad344e
to
59e56d2
Compare
Nice work @pasqualet! Thanks for fixing this! /lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, reminder for release note and people dropping here
containerd_runtimes
no longer exists and containerd_additional_runtimes
should now be used.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, pasqualet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This also introduce 3 new variables when using cgroupfs
Will try to remember that for the release note. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix the usage of cgroupfs with containerd
Which issue(s) this PR fixes:
Fixes #8122
Special notes for your reviewer:
You can test the PR with the following variables:
Does this PR introduce a user-facing change?: